﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogCategoriesEdit.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.BlogCategoriesEdit" %>
<owc:OwDetailsView ID="BlogCategorydv" runat="server" AutoGenerateRows="False" DataKeyNames="BlogCategoryID"
    DataSourceID="BlogCategoryOds" OwNotificationID="" EnableModelValidation="True">
    <Fields>
        <asp:TemplateField>
            <InsertItemTemplate>
                <fieldset>
                    <legend>
                        <asp:Localize ID="Localize2" Text="<%$ OwR:GeneralInfo %>" runat="server"></asp:Localize>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup" runat="server" OwCategoryVisible="false"
                            OwAuthorVisible="false" OwSourceVisible="false" OwWardLocalityVisible="false"
                            OwBindLanguageValue='<%#Bind("LanguageCode")%>' OwBindPortalValue='<%#Bind("PortalID") %>' />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabelOwR" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize8" Text="<%$ OwR:TitleLabel %>" runat="server"></asp:Localize>:&nbsp;
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtTitle" runat="server" Width="680px" OwDefaultValue=""
                                        OwUsedForEdit="False" Text='<%# Bind("Name") %>' LabelWidth="">
                                    </owc:OwTextBox>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator1" runat="server"
                                        ErrorMessage=" <%$ OwR: TitleNotEmpty %>" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="BlogOwR" runat="server" OwText="Blog" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwComboBox ID="OwBlogCbb" runat="server" DataSourceID="OwBlogOds" DataTextField="Title"
                                        SkinID="OwComboBox" DataValueField="BlogID" AppendDataBoundItems="True" SelectedValue='<%# Bind("BlogID") %>'>
                                    </owc:OwComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="ThumbImageOwR" runat="server" OwText="ThumbImage"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwEditor ID="ThumbEditor" runat="server" OwStoragePlace="Common" Style="position: relative;"
                                        SkinID="OwEditorInsertImageOnly" OwBindValue='<%# Bind("ThumbImage") %>' OwEditorType="OnlyInsertImage">
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="ContentLabel" runat="server" OwText="ContentLabel" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwEditor ID="Detailtxt" runat="server" OwStoragePlace="Common" Content='<%# Bind("Description") %>'
                                        SkinID="OwEditorFull">
                                    </owc:OwEditor>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator3" runat="server"
                                        ControlToValidate="Detailtxt" ErrorMessage=" <%$ OwR: DetailNotEmpty %>"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span class="titleLegen">
                        <owc:OwR ID="OptionLabel" runat="server" OwText="OptionLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="IsEnabledCbb" Text="<%$ OwR:IsEnabled %>" Checked='<%# Bind("IsEnabled") %>' />
                                    </fieldset>
                                </td>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isMenuCbb" Text="Chọn Menu" Checked='<%# Bind("IsMenu") %>' />
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isHomePageCbb" Text="<%$ OwR:IsHomeDisplay %>"
                                            Checked='<%# Bind("IsHomePage") %>' />
                                    </fieldset>
                                </td>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isDeletedCbb" Text="<%$ OwR:IsDeleted %>" Checked='<%# Bind("IsDeleted") %>' />
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <table>
                                            <tr>
                                                <td class="tdinFs">
                                                    <owc:OwR ID="SortOrderOwR" OwText="SortOrder" runat="server"></owc:OwR>
                                                </td>
                                                <td>
                                                    <owc:OwTextBox SkinID="owTextBox" ID="txtSortOrder" runat="server" Width="100px"
                                                        Text='<%# Bind("SortOrder") %>' EmptyMessage="<%$ OwR: EnterSortOrder %>">
                                                    </owc:OwTextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                                <td valign="top">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span class="titleLegen">
                        <asp:Localize ID="Localize23" Text="<%$ OwR: ExtInfo %>" runat="server"></asp:Localize>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="CreatingUser" runat="server" OwText="CreatingUser" OwSuffix=":"></owc:OwR>
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtcreatingUser" runat="server" Enabled="False"
                                        Width="200px" OwUsedForEdit="False" Text='<%#Eval("CreatingUser")!=null? (Membership.GetUser(Eval("CreatingUser"))!=null?Membership.GetUser(Eval("CreatingUser")).UserName:"n/a"):"n/a"  %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%#Eval("CreatingUser")!=null? (Membership.GetUser(Eval("CreatingUser"))!=null?Membership.GetUser(Eval("CreatingUser")).ProviderUserKey:""):"" %>'
                                        ID="CreatingUserLabel" Visible="false" runat="server" Text='<%# Bind("CreatingUser") %>' />
                                </td>
                                <td>
                                    <asp:Localize ID="Localize6" runat="server" Text="<%$ OwR:CreatedDate %>"></asp:Localize>
                                    &nbsp;:
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtCreatedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="True" Text='<%# Bind("DateTimeCreated") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize12" Text="<%$ OwR:LastEditingUser %>" runat="server"></asp:Localize>
                                    :
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtlastEditingUser" runat="server" Enabled="False"
                                        Width="200px" OwUsedForEdit="False" Text='<%#Eval("EditingUser")!=null? (Membership.GetUser(Eval("EditingUser"))!=null?Membership.GetUser(Eval("EditingUser")).UserName:"n/a"):"n/a"   %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Eval("EditingUser")!=null? (Membership.GetUser(Eval("EditingUser"))!=null?Membership.GetUser(Eval("EditingUser")).ProviderUserKey:""):""    %>'
                                        ID="EditingUserLabel" Visible="false" runat="server" Text='<%# Bind("EditingUser") %>' />
                                </td>
                                <td>
                                    <asp:Localize ID="Localize14" runat="server" Text="<%$ OwR:LastEditedDate %>"></asp:Localize>
                                    :
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtlastEditedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="False"
                                        Text='<%# Bind("DateTimeEdited") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize16" Text="<%$ OwR:DeletingUser %>" runat="server"></asp:Localize>
                                    :
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtdeletingUser" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue="" OwUsedForEdit="False" Text='<%# Bind("DeletingUser") %>'>
                                    </owc:OwTextBox>
                                </td>
                                <td>
                                    <asp:Localize ID="Localize17" runat="server" Text="<%$ OwR:DeletedDate %>"></asp:Localize>
                                    :
                                </td>
                                <td colspan="2">
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtdeletedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue="" OwUsedForEdit="False" Text='<%# Bind("DateTimeDeleted") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <br />
                <br />
                <br />
            </InsertItemTemplate>
            <EditItemTemplate>
                <fieldset>
                    <legend>
                        <asp:Localize ID="Localize2" Text="<%$ OwR:GeneralInfo %>" runat="server"></asp:Localize>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup" runat="server" OwCategoryVisible="false"
                            OwAuthorVisible="false" OwSourceVisible="false" OwWardLocalityVisible="false"
                            OwBindLanguageValue='<%#Bind("LanguageCode")%>' OwBindPortalValue='<%#Bind("PortalID") %>' />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabelOwR" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize8" Text="<%$ OwR:TitleLabel %>" runat="server"></asp:Localize>:&nbsp;
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtTitle" runat="server" Width="680px" OwDefaultValue=""
                                        OwUsedForEdit="False" Text='<%# Bind("Name") %>' LabelWidth="">
                                    </owc:OwTextBox>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator1" runat="server"
                                        ErrorMessage=" <%$ OwR: TitleNotEmpty %>" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="BlogOwR" runat="server" OwText="Blog" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwComboBox ID="OwBlogCbb" runat="server" DataSourceID="OwBlogOds" DataTextField="Title"
                                        SkinID="OwComboBox" DataValueField="BlogID" AppendDataBoundItems="True" SelectedValue='<%# Bind("BlogID") %>'>
                                    </owc:OwComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="ThumbImageOwR" runat="server" OwText="ThumbImage"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwEditor ID="ThumbEditor" runat="server" OwStoragePlace="Common" Style="position: relative;"
                                        SkinID="OwEditorInsertImageOnly" OwBindValue='<%# Bind("ThumbImage") %>' OwEditorType="OnlyInsertImage"
                                        Content='<%# Eval("ThumbImage") %>'>
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="ContentLabel" runat="server" OwText="ContentLabel" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwEditor ID="Detailtxt" runat="server" OwStoragePlace="Common" Content='<%# Bind("Description") %>'
                                        SkinID="OwEditorFull">
                                    </owc:OwEditor>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator3" runat="server"
                                        ControlToValidate="Detailtxt" ErrorMessage=" <%$ OwR: DetailNotEmpty %>"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span class="titleLegen">
                        <owc:OwR ID="OptionLabel" runat="server" OwText="OptionLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="IsEnabledCbb" Text="<%$ OwR:IsEnabled %>" Checked='<%# Bind("IsEnabled") %>' />
                                    </fieldset>
                                </td>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isMenuCbb" Text="Chọn Menu" Checked='<%# Bind("IsMenu") %>' />
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isHomePageCbb" Text="<%$ OwR:IsHomeDisplay %>"
                                            Checked='<%# Bind("IsHomePage") %>' />
                                    </fieldset>
                                </td>
                                <td>
                                    <fieldset class="fsStandard">
                                        <owc:OwCheckBox runat="server" ID="isDeletedCbb" Text="<%$ OwR:IsDeleted %>" Checked='<%# Bind("IsDeleted") %>' />
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <fieldset class="fsStandard">
                                        <table>
                                            <tr>
                                                <td class="tdinFs">
                                                    <owc:OwR ID="SortOrderOwR" OwText="SortOrder" runat="server"></owc:OwR>
                                                </td>
                                                <td>
                                                    <owc:OwTextBox SkinID="owTextBox" ID="txtSortOrder" runat="server" Width="100px"
                                                        Text='<%# Bind("SortOrder") %>' EmptyMessage="<%$ OwR: EnterSortOrder %>">
                                                    </owc:OwTextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                                <td valign="top">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span class="titleLegen">
                        <asp:Localize ID="Localize23" Text="<%$ OwR: ExtInfo %>" runat="server"></asp:Localize>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="CreatingUser" runat="server" OwText="CreatingUser" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtcreatingUser" runat="server" Enabled="False"
                                        Width="200px" OwUsedForEdit="False" Text='<%# Membership.GetUser().UserName %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Membership.GetUser().ProviderUserKey %>'
                                        ID="CreatingUserLabel" Visible="false" runat="server" Text='<%# Bind("CreatingUser") %>' />
                                </td>
                                <td>
                                    <asp:Localize ID="Localize6" runat="server" Text="<%$ OwR:CreatedDate %>"></asp:Localize>
                                    &nbsp;:
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtCreatedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="True" Text='<%# Bind("DateTimeCreated") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize12" Text="<%$ OwR:LastEditingUser %>" runat="server"></asp:Localize>
                                    :
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtlastEditingUser" runat="server" Enabled="False"
                                        Width="200px" OwUsedForEdit="False" Text='<%# Membership.GetUser()!=null ? Membership.GetUser().UserName:"not loggedin!" %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Membership.GetUser()!=null ? Membership.GetUser().ProviderUserKey:null %>'
                                        ID="EditingUserLabel" Visible="false" runat="server" Text='<%# Bind("EditingUser") %>' />
                                </td>
                                <td>
                                    <asp:Localize ID="Localize14" runat="server" Text="<%$ OwR:LastEditedDate %>"></asp:Localize>
                                    :
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtlastEditedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="False"
                                        Text='<%# Bind("DateTimeEdited") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <asp:Localize ID="Localize16" Text="<%$ OwR:DeletingUser %>" runat="server"></asp:Localize>
                                    :
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtdeletingUser" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue="" OwUsedForEdit="False" Text='<%# Bind("DeletingUser") %>'>
                                    </owc:OwTextBox>
                                </td>
                                <td>
                                    <asp:Localize ID="Localize17" runat="server" Text="<%$ OwR:DeletedDate %>"></asp:Localize>
                                    :
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtdeletedDate" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue="" OwUsedForEdit="False" Text='<%# Bind("DateTimeDeleted") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <br />
                <br />
                <br />
            </EditItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    </owc:OwButton>
                    <owc:OwButton ID="EditUpdateThenCloseButton" runat="server" CommandName="Update"
                        Text='<%$OwR:Update %>' OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;
                    <owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                    </owc:OwConfirmButton>
                    &nbsp;<owc:OwButton ID="EditCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </EditItemTemplate>
            <InsertItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="InsertInsertButton" runat="server" CommandName="Insert" Text="<%$OwR:Insert %>"
                        OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;<owc:OwButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </InsertItemTemplate>
        </asp:TemplateField>
    </Fields>
</owc:OwDetailsView>
<owc:OwObjectDataSource ID="BlogCategoryOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogCategoriesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetEntity" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogCategoriesBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:QueryStringParameter Name="blogCategoryID" QueryStringField="ID" Type="Int64" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwObjectDataSource ID="OwBlogOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetAll" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogsBLL" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
